package wangwenjun.phase2.concurrencypattern.eventbus.framework;

import lombok.Data;

import java.lang.reflect.Method;

/**
 * @author ChangLiang
 * @date 2020/6/18
 */
@Data
class Subscriber {

    /**
     * Subscriber 类封装了订阅者对象实例和被{@link EventSubscribe}已标记的方法，也就是说一个对象实例有
     * 可能会被封装成若干个Subscriber
     */

    private final Object subscribeObject;

    private final Method subscribeMethod;

    private boolean disable = false;

    public Subscriber(Object subscribeObject, Method subscribeMethod) {
        this.subscribeMethod = subscribeMethod;
        this.subscribeObject = subscribeObject;
    }
}
